<?php
$a = 'Content-Type: text/plain; charset=windows-1250; name="application.ini"' . "\r\n" .
	 'Content-Transfer-Encoding: base64; Content-Disposition: attachment; filename="application.ini"';

preg_match('/charset=(?P<charset>[a-zA-Z0-9-]+)[;\r\n]{1}/', $a, $matches);
print_r($matches);

preg_match('/name="(?P<name>[[\w.-]+)"/', $a, $matches);
print_r($matches);

preg_match('/Content-Transfer-Encoding: (?P<trenc>[a-zA-Z0-9-]+)[;\r\n]{1}/', $a, $matches);
print_r($matches);